package com.by.bean;

import com.by.common.group.ISave;
import com.by.common.group.IUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.springframework.stereotype.Service;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * ;
 *
 * @author : http://www.chiner.pro
 * @date : 2024-9-11
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("员工")
public class Employee implements Serializable {
    /**
     * 员工id
     */
    @NotNull(message = "员工id不能为空", groups = {IUpdate.class})
    @ApiModelProperty(name = "员工id,修改时不能为空")
    private Integer id;
    /**
     * 用户id
     */
    @ApiModelProperty(hidden = true)
    private Integer userId;
    @Valid
    private User user;
    /**
     * 员工名称
     */
    @NotEmpty(message = "员工名称不能为空", groups = {ISave.class, IUpdate.class})
    @ApiModelProperty(value = "员工姓名", required = true)
    private String name;
    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    private String mobile;
    /**
     * 所在部门id
     */
    @ApiModelProperty(value = "所在部门id")
    private Integer deptId;
    /**
     * 工作岗位
     */
    @ApiModelProperty(value = "工作岗位")
    private String job;
    /**
     * 薪资
     */
    @ApiModelProperty(value = "薪资")
    private Double salary;
    /**
     * 出生日期
     */
    @ApiModelProperty(value = "出生日期")
    private String birthday;
    /**
     * 入职时间
     */
    @ApiModelProperty(value = "入职时间")
    private String entryDate;
    /**
     * 角色id
     */
    @ApiModelProperty(value = "角色id")
    private Integer roleId;
    /**
     * 1 普通员工
     * 2 内销
     * 3 外销
     */
    @ApiModelProperty(value = "员工类型", required = true)
//    @NotNull(message = "员工类型不能为空", groups = {ISave.class, IUpdate.class})
    private Integer type;
    /**
     * 1  需要审核
     * 2 无需审核
     */
    @ApiModelProperty(value = "产品参数支持", required = true)
//    @NotNull(message = "产品参数支持,不能为空", groups = {ISave.class, IUpdate.class})
    private Integer pp;
    /**
     * 年度业绩目标
     */
    @ApiModelProperty(value = "年度业绩目标")
    private Double performance;
    /**
     * 已实现业绩目标
     */
    @ApiModelProperty(value = "已完成业绩目标")
    private Double hasFininsh;
}